<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>重建表格</title>
</head>
<body>
<script>
    var contents = ['Car', 'Top Speed', 'Price', 'Chevrolet', '120mph', '$10,000', 'Pontiac', '120mph', '$20,000'];
    var table = document.createElement('table');
    for (var i = 0; i < contents.length; i += 3) {
        var tr = document.createElement('tr');
        for (var j = 0; j < 3; j++) {
            var td = document.createElement('td');
            var text = document.createTextNode(contents[i + j]);
            td.appendChild(text);
            tr.appendChild(td);
        }
        table.appendChild(tr);
    }
    document.body.appendChild(table);
</script>
</body>
</html>